//
//  ActivityFooterView.swift
//  甜言蜜语
//
//  Created by yingli_yanfa_liuxingyu on 16/9/21.
//  Copyright © 2016年 wl. All rights reserved.
//

import UIKit
protocol ActivityFooterViewDelegate {
    func reportBtnSelected()
    func shareBtnSelected(sender: UIButton)
    func buyBtnSelected()
    func applyBtnSelected()
}
class ActivityFooterView: UIView {

    @IBOutlet weak var reportBtn: UIButton!
    @IBOutlet weak var shareBtn: UIButton!
    @IBOutlet weak var buyBtn: UIButton!
    @IBOutlet weak var applyBtn: UIButton!
    var delegate: ActivityFooterViewDelegate?
    
    override func drawRect(rect: CGRect) {
        self.buyBtn.layer.masksToBounds = true
        self.buyBtn.layer.cornerRadius = 10
        self.buyBtn.layer.borderWidth = 1
        self.buyBtn.layer.borderColor = NAVIGATIONBAR_RED_COLOR.CGColor
        self.buyBtn.backgroundColor = UIColor.whiteColor()
        self.buyBtn.setTitleColor(NAVIGATIONBAR_RED_COLOR, forState: UIControlState.Normal)
        
        self.applyBtn.layer.masksToBounds = true
        self.applyBtn.layer.cornerRadius = 10
        self.applyBtn.layer.borderWidth = 1
        self.applyBtn.layer.borderColor = NAVIGATIONBAR_RED_COLOR.CGColor
        self.applyBtn.backgroundColor = NAVIGATIONBAR_RED_COLOR
        self.applyBtn.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
        
    }
    @IBAction func reportBtnClicked(sender: UIButton){
        delegate?.reportBtnSelected()
        
    }
    
    @IBAction func shareBtnClicked(sender: UIButton){
        delegate?.shareBtnSelected(sender)
        
    }
    
    @IBAction func buyBtnClicked(sender: UIButton){
        delegate?.buyBtnSelected()
    }
    
    @IBAction func applyBtnClicked(sender: UIButton){
        delegate?.applyBtnSelected()
    }
    

}
